home *** CD-ROM | disk | FTP | other *** search
/ Total Web Page (Professional Suite) / Total Web Page 99.iso / CGI / YFORM.ZIP / SAMPFORM.TXT < prev    next >
Text File  |  1997-02-28  |  6KB  |  96 lines

  1. README FILE FOR PRSD SAMPLE EMAIL-FORM
  2.     Ashley Bass 1/29/97
  3.  
  4. The sampform.htm file included in this archive is a template you can use to give your pages the benefit of user-input forms. The data from their input will automatically be emailed to the address you specify (see below) and you have the options of sending the user a customizable courtesy reply and of adding each user's input to a flat-file database which can be downloaded and used in any database prog for report generation.
  5.     The sampform.htm file will look good in your browser in its current state. However, it won't be of any use to you until you configure it to your needs. This file will present you the essential lines of HTML code you should modify to do that. If you've other questions, please contact Ashley Bass (abass@iname.com).
  6.  
  7.    Here is a copy of the sampform.htm form code. My tack here is to just draw your attention to the lines that you should change. I'll add comments below those lines only. Any other questions, please email me.
  8. NOTE: as of Wednesday, 2/19/97 the "Print_config" funtion is gone. I set the script up so that the poster's name and email address will always be included in the body of the mail message. This was necessary in order to facilitate the append to database function properly.  Thanks to Joe Newton for the push and ideas to get the database function working "flawlessly."
  9.  
  10.  
  11. <FORM METHOD="POST" ACTION="###URL TO YOUR CGI BIN### /yform.cgi">
  12.         HEY:    you need to specify where you have the script stored
  13. <input type=hidden name="recipient" value="YOUR EMAIL ADDRESS HERE">
  14.         HEY:    replace the "your email..." text with the email address you wish
  15.          the form's output sent to. (keep the quotes)
  16. <input type=hidden name="sort" value="order:name,email,location,position,comments">
  17.         HEY:    this one is the most work. You need to specify your form fields in the order
  18.          you wish them to appear in your email response and on the user response page.
  19.     If you forget to add one of your fields, it won't appear. Oops.
  20. <input type=hidden name="required" value="name,email,location,position">
  21.         HEY:    the value= what you require the user to supply. For database purposes, you
  22.     need to require every form field you have except for the last one listed in sort. So, if you
  23.     have a comments field, it should go last as that's usually the least important info.
  24.     When I figure out how to get an empty form field to still return somthing that  can 
  25.     fill a database field, this limitation will vanish.
  26. <input type=hidden name="subject" value="EMAIL SUBJECT HEADER HERE">
  27.         HEY:    replace the "your email..." text with the email address you wish
  28.          the form's output sent to. (keep the quotes)
  29.  
  30.         <!-- The next five lines are on the response page -->
  31. <input type=hidden name="title" value="Feedback Form Results">
  32.         HEY:    value= appears in the browser title bar
  33. <input type=hidden name="thanka" value="Thank you for filling out our form.">
  34.         HEY:   value= appears in large, bold text at top of page
  35. <input type=hidden name="return_link_title" value="Back to main page">
  36.         HEY:    value= fills a button which if clicked will send user to return_link_url below
  37. <input type=hidden name="return_link_url" value="http://www.nauticom.net/www/prsd/">
  38.         HEY:   value= is the page you offer to users on a button for return purposes
  39.  
  40.         <!-- The next two lines are for the database -->
  41. <input type=hidden name="appenddatabase" value="FILENAME">
  42.         HEY:    value= the path to and file that you want to hold your form's data
  43.     use a null string ( "" ) for value if you don't want a database kept. If you have
  44.     trouble with this: make sure the file already exists, set its permissions to 777, 
  45.     make the path to it relative to your cgi-bin (i.e. " ./formdata/yourfile.dat ")
  46. <input type=hidden name="delimiter" value="|">
  47.         HEY:    value= the character you wish to separate your database fields --
  48.     avoid using common typing characters such as @ (email) or commas
  49.  
  50.        <!-- The next four lines are for the courtesy email response -->
  51. <input type=hidden name="courtesy" value="yes">
  52.      HEY:    set value='"" (null) if you don't want to send courtesy reply. Meanie.
  53. <input type=hidden name="texta" value="Thank you for your time.">
  54.      HEY:    value= first line of courtesy reply text
  55. <input type=hidden name="textb" value="Please contact us if you need to.">
  56.      HEY:    value= second line of courtesy reply text
  57. <input type=hidden name="weare" value="Domino Computing Services">
  58.      HEY:    value= a name underneath the "Regards," of the reply
  59. <input type=hidden name="callat" value="mailto:abass@iname.com">
  60.      HEY:    value= an email or webpage address so the user can get back in touch
  61.     note! email addresses should be entered like so: "mailto:abass@fyi.net"
  62.     note! webpage address should be entered like so: "http://www.fyi.net/~abass"
  63.  
  64. <!-- The visible form elements begin here -->
  65.     HEY:    the rest of the form is made up of visible INPUT elements and labeling text. If you don't know 
  66.     what each item means, you can do the trial and error approach or find some html forms 
  67.     tutorials on the WWW. That's where I got it all.
  68.  
  69. <I>Your full name:</I> <INPUT type=text name="name"><br>
  70. <INPUT type=text name="email"><I> :Email address</I><br>
  71. <I>Where are you? <font size=2>[ city, state country] </I></font> <br>
  72. <INPUT  type=text name="location" size=29> <br>
  73. <I>Are you a:</I> <br>
  74. <INPUT type=checkbox name="position" value="Student">Student
  75.  <INPUT  type=checkbox name="position" value="Teacher">Teacher
  76.  <INPUT  type=checkbox name="position" value="Other">Other <br>
  77. <I>What would you like to tell us?</I> <br>
  78. <TEXTAREA wrap=virtual name="comments" rows=6 cols=35></TEXTAREA> <br>
  79. <INPUT type=submit value="Submit"> 
  80. <INPUT type=reset value="Reset">
  81. </form>
  82.  
  83.  
  84.  
  85. Enjoy it.
  86. Ashley Bass
  87. http://www.fyi.net/~abass
  88. http://www.fyi.net/~abass/domino
  89.  
  90. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  91. Had I not seen the Sun
  92. I could have borne the shade
  93. But Light a newer Wilderness
  94. My Wilderness has made--
  95.      
  96.     Emily Dickinson